/* 白红配色 - 音乐应用样式 */
:root {
  --primary-color: #e53e3e;
  --primary-hover: #c53030;
  --secondary-color: #fff5f5;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --text-tertiary: #4a5568;
  --border-color: #fee5e5;
  --background-color: #ffffff;
  --background-secondary: #fffaf5;
  --red-color: #e53e3e;
  --red-light: #fed7d7;
  --shadow-light: 0 1px 2px 0 rgba(229, 62, 62, 0.1);
  --shadow-medium: 0 2px 8px 0 rgba(229, 62, 62, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--background-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 顶部横幅 */
.top-banner {
  background-color: var(--red-color);
  color: white;
  padding: 8px 0;
  font-size: 14px;
}

.top-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.experience-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* 导航栏 */
.navbar {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

.logo-icon {
  width: 24px;
  height: 24px;
  background-color: var(--primary-color);
  border-radius: 4px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 8px 0;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.new-tag {
  position: absolute;
  top: -8px;
  right: -20px;
  background-color: var(--red-color);
  color: white;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 2px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-bar {
  position: relative;
  width: 240px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--background-secondary);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--background-secondary);
}

/* 主布局 */
.main-layout {
  display: grid;
  grid-template-columns: 200px 1fr 300px;
  gap: 16px;
  margin-top: 16px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

/* 左侧分类栏 */
.sidebar-left {
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
}

.category-list {
  list-style: none;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.category-item:hover {
  background-color: var(--background-secondary);
  color: var(--text-primary);
}

.category-item.active {
  background-color: var(--primary-color);
  color: white;
}

.category-item.active .category-dot {
  background-color: white;
}

.category-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-secondary);
}

.category-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

/* 中间内容区 */
.main-content {
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 16px;
}

.content-tabs {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.tab {
  padding: 12px 0;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--primary-color);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.article-card:hover {
  background-color: var(--background-secondary);
}

.article-content {
  flex: 1;
}

.article-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.article-tags {
  display: flex;
  gap: 8px;
}

.tag {
  padding: 2px 8px;
  background-color: var(--background-secondary);
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 12px;
}

.article-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* 右侧边栏 */
.sidebar-right {
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
}

.greeting-section {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--primary-color), #4e9eff);
  color: white;
  border-radius: 8px;
  margin-bottom: 16px;
}

.greeting-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
}

.greeting-subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.ranking-section {
  margin-bottom: 24px;
}

.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ranking-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.refresh-btn {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
}

.ranking-list {
  list-style: none;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.ranking-item:hover {
  color: var(--text-primary);
}

.ranking-number {
  width: 20px;
  height: 20px;
  background-color: var(--background-secondary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.ranking-item:nth-child(1) .ranking-number {
  background-color: #ff6b35;
  color: white;
}

.ranking-item:nth-child(2) .ranking-number {
  background-color: #ff9f43;
  color: white;
}

.ranking-item:nth-child(3) .ranking-number {
  background-color: #feca57;
  color: white;
}

.view-more {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  display: block;
  margin-top: 12px;
}

.author-list {
  list-style: none;
}

.author-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.author-item:last-child {
  border-bottom: none;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background-secondary);
  flex-shrink: 0;
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.author-title {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.follow-btn {
  padding: 4px 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 180px 1fr 280px;
  }
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .sidebar-left,
  .sidebar-right {
    display: none;
  }
  
  .navbar-content {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 交互效果增强 */
.experience-btn:hover {
  background-color: #1677ff;
  transform: translateY(-1px);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.category-item {
  transition: all 0.3s ease;
}

.category-item:hover {
  transform: translateX(4px);
}

.tab {
  transition: all 0.3s ease;
}

.tab:hover {
  color: var(--primary-color);
}

.article-card {
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.refresh-btn {
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  color: var(--primary-color);
  transform: rotate(180deg);
}

.ranking-item {
  transition: all 0.3s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
}

.follow-btn {
  transition: all 0.3s ease;
}

.follow-btn:hover {
  background-color: #1677ff;
  transform: scale(1.05);
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card {
  animation: fadeIn 0.6s ease-out;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }
.article-card:nth-child(7) { animation-delay: 0.7s; }
